<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /*let xhs=0,xg=10;
    if(xg!=0){
        xhs=1;
    }else if(xg===0){
        xhs=2
    }
    console.log(xhs);
    console.log('--------------');
    let a,b,max;
    a = prompt();
    b = prompt();
    if(a>b){
       max=a; 
       console.log(max);
    }else if(a<b){
        max=b;
        console.log(max);
    }else{
        max='a和b相等';
    }
    console.log(max);*/
    //switch语句:
    console.log('---------------');
    let day = prompt();
    let xqj;
    switch(day){
        case '0':
           xqj ='星期天';
           break;
        case '1':
           xqj ='星期一';
           break; 
        case '2':
           xqj ='星期二';
           break;
        case '3':
           xqj ='星期三';
           break;
        case '4':
           xqj ='星期四';
           break;
        case '5':
           xqj ='星期五';
           break;
        case '6':
           xqj ='星期六';
           break;
        default:
            xqj ='没有这个星期值';
            break;
    }
    console.log(xqj);

    //打印1~100的值相加之和
    let sum ;
    for(let i=1; i<=100; i++){
        sum+=i;   //sum = sum+i
    }
    console.log(sum);
    console.log('---------------');
    let num = 0,sum1;
    while(num<10){
        sum1+=num;
        num++;
    }
    console.log(sum1);

</script>
</html>